package pro.wy.adapterpattern.impl;

import pro.wy.adapterpattern.adapterpattern.NbaAdapter;
import pro.wy.adapterpattern.interfaces.IPlayerEnglish;

public class PlayerEnglish implements IPlayerEnglish {
	NbaAdapter nbaAdapter;

	public void talk(String name) {
		if (!"姚明".equals(name)) {
			System.out.println("I can only understand English！！！！！Fire！！！");
		} else {
			if (nbaAdapter == null) {
				nbaAdapter = new NbaAdapter();
				nbaAdapter.talk(name);
			}
		}
	}

}
